<?php $actions = $this->configuration->getCartSlotActions() ?>
[?php slot('<?php echo $this->configuration->getCartSlotName() ?>') ?]
<?php foreach ($actions as $name => $params): ?>
  <?php if ('_homepage' == $name): ?>
    <?php echo $this->addCredentialCondition('[?php echo $helper->slotActionToHomepage('.$this->asPhp($params).') ?]', $params) ?>
  <?php elseif ('_list' == $name): ?>
<?php if (!isset($this->params['confirm_cart_reset']) || $this->params['confirm_cart_reset'] == true): ?>
<?php $php_params = sprintf(<<<EOF
array_merge(is_null(%s) ? array() : %s, array('params' => array('onclick' => 'return confirm_cart_reset("'.__('%s').'\\n'.__('%s').'", "'.url_for(\$sf_context->getModuleName().'/cartReset').'")')))
EOF
  ,
  $this->asPhp($params),
  $this->asPhp($params),
  'Do you want your current cart selection to be reset?',
  'Press \"Accept\" if you would like the cart to be reset, otherwise press \"Cancel\".'
);
?>
      <?php echo $this->addCredentialCondition('[?php echo $helper->slotActionToList('.$php_params.') ?]', $params) ?>
<?php else: ?>
      <?php echo $this->addCredentialCondition('[?php echo $helper->slotActionToList('.$this->asPhp($params).') ?]', $params) ?>
<?php endif; ?>
  <?php elseif ('_close' == $name): ?>
    <?php echo $this->addCredentialCondition('[?php echo $helper->slotActionToClose('.$this->asPhp($params).') ?]', $params) ?>
  <?php elseif ('_cart_reset' == $name) : ?>
    [?php if (count($cart_objects) > 0): ?]
      <?php echo $this->addCredentialCondition('[?php echo $helper->slotActionToCartReset('.$this->asPhp($params).') ?]', $params) ?>
    [?php endif ?]
  <?php elseif (strpos($name, '_cart_form_') === 0) : ?>
    [?php if (count($cart_objects) > 0): ?]
      <?php echo $this->addCredentialCondition('[?php echo $helper->slotActionToCartFormAction('.$this->asPhp($params).') ?]', $params) ?>
    [?php endif ?]
  <?php elseif (strpos($name, '_cart_batch_form_') === 0) : ?>
    [?php if (count($cart_objects) > 0): ?]
      <?php echo $this->addCredentialCondition('[?php echo $helper->slotActionToCartBatchFormAction('.$this->asPhp($params).') ?]', $params) ?>
    [?php endif ?]
  <?php elseif (strpos($name, '_cart_batch_') === 0) : ?>
    [?php if (count($cart_objects) > 0): ?]
      <?php echo $this->addCredentialCondition('[?php echo $helper->slotActionToCartBatchAction('.$this->asPhp($params).') ?]', $params) ?>
    [?php endif ?]
  <?php elseif (strpos($name, '_cart_redirect_') === 0) : ?>
    [?php if (count($cart_objects) > 0): ?]
      <?php echo $this->addCredentialCondition('[?php echo $helper->slotActionToCartRedirectAction('.$this->asPhp($params).') ?]', $params) ?>
    [?php endif ?]
  <?php elseif (strpos($name, '_cart_') === 0) : ?>
    [?php if (count($cart_objects) > 0): ?]
      <?php echo $this->addCredentialCondition($this->getSlotAction($name, $params, false), $params) ?>
    [?php endif ?]
  <?php endif; ?>
<?php endforeach; ?>
[?php end_slot() ?]
